<template>
  <div id="mydoctor">
    <van-nav-bar
      fixed
      placeholder
      title="协议条款"
      left-text="返回"
      left-arrow
      @click-left="back"
    />
    <div class="content" v-html="tiaokuan">

    </div>
  </div>
</template>

<script>
  import { xieyi_info } from "@/apis/home";
  export default {
    data() {
      return {
        info: {},
        tiaokuan:''
      };
    },
    methods: {
      back() {
        this.$router.go(-1); //返回上一层
      },
      load() {
        xieyi_info()
          .then(res => {
            if(res.codes == 200){
              this.tiaokuan = res.data.tiaokuan
            }
          })
          .catch(err => {
            if(err.msg){
              this.$toast(err.msg);
            }else{
              this.$toast('网络错误');
            }
          });
      },
    },
    mounted() {
      this.load();
    }
  };
</script>

<style lang="less">
  #mydoctor {
    .content {
      padding: 15px 10px;
      text-align: left;
      background: #fff;
    }
  }
</style>
